<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>加盟信息</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" type="text/css" href="css/layer.css"/>
    <link rel="stylesheet" href="css/_all-skins.min.css">
    <link rel="stylesheet" href="css/layui.css"/>


</head>
<style>
    .product_din span {
        display: inline-block;
        height: 80px;
        width: 38%;
        margin-bottom: 20px;
        text-align: center;
    }

    .product_din2 span {
        display: inline-block;
        height: 80px;
        margin-bottom: 20px;
        width: 30%;
        text-align: center;

    }

    .product_din2, .product_din {
        float: left;
    }

    .product {
        height: 200px;
        margin-top: 20px;
    }

    .product div {
        display: inline-block;
        width: 49%;
    }

    .act_border {
        border-right: solid 1px #B8C7CE;
    }

    .product b {
        color: red;
        font-size: 22px;
        line-height: 30px;
    }

    .icon_style i {
        margin-right: 20px;
        margin-left: 10px;
        font-size: 20px;
    }

    .icon_style .small-box p {
        line-height: 30px;
    }

    .icon_style .small-box span {
        margin-left: 20px;
        display: inline-block;
        border-bottom: solid 1px white;
    }

    .content table {
        border-collapse: collapse;
        border: solid 1px #c7c7c7;
        background: white;
    }

    .content table tr {
        height: 35px;
    }

    .content table th {
        background: #3c8dbc;
        color: white;
    }

    .content table td, .content table th {
        border: solid 1px #d2d6de;
        text-align: center;
        height: 30px;
        font-weight: normal;
    }
</style>
<body class="hold-transition skin-blue sidebar-mini fixed">
<div class="wrapper">

    <header class="main-header">
        <!-- Logo -->
        <div class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->

            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><b>SuitLove</b></span>
        </div>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>

            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">

                            <img src="img/user2-160x160.jpg" class="user-image" alt="User Image">
                            <span class="hidden-xs  manger-name">Amy</span>

                            <span class="change_password" style="font-size: 12px;margin-left: 40px;">修改密码</span>
                            <span class="exit_login" style="font-size: 12px;">退出登录</span>
                        </a>

                    </li>
                </ul>
            </div>
        </nav>
    </header>
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar user panel -->
            <div class="user-panel">
                <div class="pull-left image">
                    <img src="img/user2-160x160.jpg" class="img-circle">
                </div>
                <div class="pull-left info">
                    <p class="manger-name">Amy</p>
                    <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
                </div>
            </div>
            <!-- search form -->
            <form action="#" method="get" class="sidebar-form">
                <!--<div class="input-group">-->
                    <!--<input type="text" name="q" class="form-control" placeholder="Search...">-->
                    <!--<span class="input-group-btn">-->
                <!--<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>-->
                <!--</button>-->
              <!--</span>-->
                <!--</div>-->
            </form>
            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu" data-widget="tree">
                <li class="header">功能目录</li>

                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-dashboard"></i> <span>系统首页</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <!--<li><a href="login_log.html"><i class="fa fa-circle-o"></i> 登录日志</a></li>-->
                        <li><a href="id_manager.html"><i class="fa fa-circle-o"></i> 账号管理</a></li>
                    </ul>
                </li>

                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-laptop"></i>
                        <span>商品管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="product_list.html"><i class="fa fa-circle-o"></i> 商品列表</a></li>
                        <li><a href="new_product.html"><i class="fa fa-circle-o"></i> 新增商品</a></li>
                        <li><a href="product_kind.html"><i class="fa fa-circle-o"></i> 商品分类</a></li>
                        <!--<li><a href="product_confirm.html"><i class="fa fa-circle-o"></i> 商品审核</a></li>-->
                        <!--<li><a href="product_income.html"><i class="fa fa-circle-o"></i> 商品回收</a></li>-->
                    </ul>
                </li>

                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-edit"></i> <span>订单管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="hire_order.html"><i class="fa fa-circle-o"></i> 订单列表</a></li>
                        <!--<li><a href="pay_order.html"><i class="fa fa-circle-o"></i> 支付订单</a></li>-->
                        <!--<li class="active"><a href="operate_log.html"><i class="fa fa-circle-o"></i> 订单日志</a></li>-->
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-pie-chart"></i>
                        <span>会员管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="pay_order.html"><i class="fa fa-circle-o"></i> 会员记录</a></li>
                        <!--<li><a href="discounts.html"><i class="fa fa-circle-o"></i> 优惠卷中心</a></li>-->
                    </ul>
                </li>
                <li class="treeview active">
                    <a href="#">
                        <i class="fa fa-pie-chart"></i>
                        <span>团购加盟</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="group_buy.html"><i class="fa fa-circle-o"></i> 团购信息</a></li>
                        <li class="active"><a href="join_in.html"><i class="fa fa-circle-o"></i> 加盟信息</a></li>
                        <!--<li><a href="product_data.html"><i class="fa fa-circle-o"></i> 商品数据</a></li>-->
                        <!--<li><a href="order_data.html"><i class="fa fa-circle-o"></i>订单数据</a></li>-->
                        <!--<li><a href="user_data.html"><i class="fa fa-circle-o"></i>用户数据</a></li>-->
                        <!--<li><a href="income_data.html"><i class="fa fa-circle-o"></i>收入数据</a></li>-->
                    </ul>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-pie-chart"></i>
                        <span>活动管理</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="activity.html"><i class="fa fa-circle-o"></i> 活动管理</a></li>
                        <!--<li><a href="discounts.html"><i class="fa fa-circle-o"></i> 优惠卷中心</a></li>-->
                    </ul>
                </li>
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->


        <!-- Main content -->


        <section class="content">
            <div class="row col-lg-12">
                <div class="col-lg-2"></div>
                <h3 class="col-lg-8" style="padding: 0;margin-top: 0;margin-bottom: 20px;">加盟信息列表</h3>
            </div>

            <div class="row">
                <div class="col-lg-2 "></div>
                <div class="col-lg-8" style="height: 500px;background: white;padding: 0;">
                    <table style="width: 100%">
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th>地区</th>
                            <th>联系人</th>
                            <th>联系电话</th>
                            <th>加盟信息</th>
                            <th>申请时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody class="table_data">

                        </tbody>
                    </table>

                </div>
                <div class="row col-lg-12" style="text-align: right;">
                    <div class="col-lg-2"></div>
                    <div id="demo7" class="col-lg-8" style="padding: 0;"></div>
                </div>
            </div>

        </section>
        <!-- /.content -->
    </div>

    <!-- /.content-wrapper -->
    <footer class="main-footer">
        <div class="pull-right hidden-xs">
            <b>Version</b> 2.0.0
        </div>
        <strong>Copyright &copy; 2018-2019 <a href="http://www.han5j.com/">西安寒武纪信息科技有限公司</a>.</strong> All rights
        reserved.
    </footer>
</div>
<script src="js/jquery.min.js"></script>

<script type="text/javascript" src="js/layui.all.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/layer.js"></script>
<script src="js/adminlte.min.js"></script>
<script src="js/jquery.slimscroll.min.js"></script>
<script src="js/jq.cookie.js"></script>
<script src="js/change_password.js"></script>
<script>
    function pageDivd(curr, page_num) {
        layui.use(['laypage', 'layer'], function () {
            var laypage = layui.laypage
                , layer = layui.layer;
            laypage.render({
                elem: 'demo7'
                , count: page_num
                , limit: 20
                , curr: curr
                , jump: function (obj, first) {
                    if (!first) {
                        getData1(obj.curr);

                    }
                }
            });
        })
    }

    getData1(1);

    function getData1(curr) {

        $.ajax({
            type: "get",
            url: "http://www.puer.zone:30000/JoiningInformation",
            async: true,
            data: {
                page: curr,
                row: 20
            },
            success: function (data) {
                if (data[0].length == 0) {
                    layer.msg('暂无数据');
                }
                TableView(data[0]);
                pageDivd(curr, data[1]);
            }
        });
    }

    function TableView(data) {
        $('.table_data').html('');

        for (var i = 0; i < data.length; i++) {
            var trText = `<tr num="${data[i][5]}">
		      		    
		      		    		<td>${i + 1}</td>
		      		    		<td>${data[i][0]}</td>
		      		    		<td>
		      		    			${data[i][1]}
		      		    		</td>
		      		    		<td>
		      		    			${data[i][2]}
		      		    		</td>
		      		    		<td>
		      		    			${data[i][3]}
		      		    		</td>
		      		    		<td>
		      		    			${data[i][4]}
		      		    		</td>
		      		    		<td>
		      		    			<button class="join_done">已处理</button>
		      		    		</td>
		      		    	</tr>
		      		    	`;

            $('.table_data').append(trText);

        }

        $('.join_done').click(function () {
            var Index = $(this).parent().parent().attr('num');
            $.ajax({
                type: "get",
                url: "http://www.puer.zone:30000/JoiningInformationDealHandler",
                async: true,
                data: {
                    Id: Index
                },
                success: function (data) {
                    if (data == 'success') {
                        layer.msg('处理成功', {time: 500}, function () {
                            location.reload();
                        })
                    } else {
                        layer.msg('处理失败')
                    }

                }

            })
        })
    }

</script>


</body>
</html>
